package demo08;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.sql.Connection;
import java.sql.SQLException;
@Component
public class DBUtil {
    @Autowired
    private DruidDataSource a;
    public Connection getConnection()throws SQLException{
        return a.getConnection();
    }
}
